<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<head>
<title>Market place</title>

</head>

<body>
	<ui:composition template="/templates/masterTemplate.xhtml">
		<ui:define name="content">
			<f:event listener="#{pictureController.loadHomePagePictures}"
				type="preRenderComponent"></f:event>
			<h:outputStylesheet library="css" name="index.css"></h:outputStylesheet>

			<div id="sideBarLeft">
				<h:form id="leftForm">

					<ui:remove>
						<p:media value="#{pictureController.randomMusic}" width="210"
							rendered="true" height="0.1" player="quicktime">
							<f:param name="autoPlay" value="true"></f:param>
							<f:param name="repeat" value="true"></f:param>
						</p:media>
					</ui:remove>
					
					<p:dataTable var="pickupInfo" resizableColumns="true"
						value="#{locationController.validPickupInfo}" paginator="false"
						paginatorTemplate="{PreviousPageLink}  {NextPageLink} "
						style="font-size:0.7em">
						<f:facet name="header">
							#{msgs.youCanPickUpLocation}
							</f:facet>
						<p:column sortBy="#{pickupInfo.address}" width="100"
							style="max-width:100">
							<p:outputLabel value="#{pickupInfo.address}" style="width:50" />
						</p:column>
						<f:facet name="footer">
							<h:commandLink value="#{msgs.detailPickupSchedule}"
								action="/public/pickupInfo.xhtml?faces-redirect=true"
								style="color:blue"></h:commandLink>
						</f:facet>
					</p:dataTable>
				</h:form>
			</div>

			<div id="center">
				<h:form id="centerForm">
					<p:galleria value="#{pictureModel.homePagePictures}"
						panelWidth="513" panelHeight="490" showCaptions="true"
						transitionInterval="3000" var="picture" effect="clip"
						frameWidth="32" frameHeight="24">
						<p:graphicImage value="../#{picture.fullFileName}" />

						<f:facet name="content">
							<h:panelGrid columns="1" cellpadding="5">
								<f:facet name="header">
									<p:graphicImage value="../#{picture.fullFileName}" width="513"
										height="420" />
								</f:facet>

								<h:outputText value="#{picture.titleLabel}"
									rendered="#{!picture.isTitleEmpty}"
									style="color:green;font-family:Georgia;font-size:1.0em;font-style:italic"></h:outputText>
							</h:panelGrid>
						</f:facet>
					</p:galleria>

				</h:form>
			</div>
			<div id="sideBarRight">
				<h:form id="rightForm">
					<ui:include src="/components/public/user/loginPanel.xhtml" />
					<ui:include src="/components/public/message/newsPanel.xhtml" />
				</h:form>
			</div>
		</ui:define>
	</ui:composition>
</body>

</html>